package cn.smart.epic.common.constant.state;

/**
 * @Auther Z.B
 * @date 2017/9/21 16:25
 * @Email 2545375@qq.com
 * @Description 管理员的状态
 * @since 1.0
 */

public enum ManagerStatus {

    OK(1,"启用"), FREEZED2(2,"冻结"), DELETED(3,"被删除");

    int code;
    String message;

    ManagerStatus(int code, String message) {
        this.code=code;
        this.message=message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static String valueOf(Integer value) {
        if (value == null) {
            return "";
        }else{
            for(ManagerStatus ms: ManagerStatus.values()){
                if (ms.getCode()==value) {
                    return ms.getMessage();
                }
            }
            return "";
        }
    }
}
